﻿namespace DotRas.Design
{
    using DotRas;
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Threading;
    using System.Windows.Forms;

    [ToolboxItem(false)]
    public abstract class RasCommonDialog : CommonDialog
    {
        private Point _location;

        [DotRas.SRDescription("RCDErrorDesc")]
        public event EventHandler<RasErrorEventArgs> Error;

        protected RasCommonDialog()
        {
        }

        protected void OnError(RasErrorEventArgs e)
        {
            if (this.Error != null)
            {
                this.Error(this, e);
            }
        }

        public override void Reset()
        {
            this.Location = Point.Empty;
        }

        [DotRas.SRCategory("CatLayout"), DefaultValue(typeof(Point), "0,0"), DotRas.SRDescription("RCDLocationDesc")]
        public Point Location
        {
            get
            {
                return this._location;
            }
            set
            {
                this._location = value;
            }
        }
    }
}

